package com.game.xmldata.factory;

import org.springframework.util.StringUtils;

import com.game.utils.TimeUtil;
import com.game.xmldata.AbstractSampleFactory;
import com.game.xmldata.sample.Box;



public class BoxFactory extends AbstractSampleFactory<Box> {

	@Override
	public String getFileName() {
		return "sample.box.xml";
	}

	@Override
	public Class<Box> getClazz() {
		return Box.class;
	}

	@Override
	public void init() {
		for (Box box : list) {
			if (!StringUtils.isEmpty(box.getHourIntervalStr())) {
				box.setHourIntervalList(TimeUtil.getTimeList(box.getHourIntervalStr()));
			}
		}
	}
}
